package models
{
	import mx.collections.ArrayCollection;

	public class DebuggerHistoryEntry extends Object
	{
		[Bindable]
		public var consoleOutput:ArrayCollection = new ArrayCollection();
		
		[Bindable]
		public var command:String;
		
		// Position (begin index, end index) in the debuggerConsoleOutput array 
		[Bindable]
		public var beginIndex:Number;
		
		[Bindable]
		public var endIndex:Number;
		
		// All the watch variables that returned by the server
		[Bindable]
		public var variables:ArrayCollection = new ArrayCollection();
		
		[Bindable]
		public var backtrace:ArrayCollection = new ArrayCollection();
		
		[Bindable]
		public var lineNumber:Number;
		
		public function DebuggerHistoryEntry()
		{
			super();
		}
		
		public function findVariableByName(name:String):Variable{
			for each(var variable:Variable in variables){
				if(variable.name == name)
					return variable;
			}
			
			return null;
		}
	}
}